<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="MvcContrib.FluentHtml.ModelViewPage<Universum.Model.Domain.Classes.PageGroup>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	CreatePageGroup
</asp:Content>
<asp:Content ContentPlaceHolderID="Breadcrumbs" ID="BreadcrumbsContent" runat="server">
	<%=Html.Breadcrumb().Home().Append<ClassesController>(c => c.Index(), "Your classes").Class(ViewData["classId"].Cast<Guid>()).AppendText("Create  page group").End()%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Create page group</h2>

    <%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %>

      <% using (Html.BeginForm<ClassesController>(controller=>controller.CreatePageGroup((FormCollection)null))){%>

        <fieldset>
            <legend>Fields</legend>
            <p>
            <%= this.TextBox( model => model.Name).Label("Name") %>
               
                <%= this.ValidationMessage( model => model.Name, "*") %>
            </p>
            <p>
            <%= this.Select( model => model.ParentGroupId)
            	.Options((IEnumerable<SelectListItem>)ViewData["pageGroups"])
            				.Label("Parent :") %>
               
                <%= this.ValidationMessage( model => model.ParentGroupId, "*") %>
            </p>
            
            <%= this.Hidden( model => model.ClassId).Value(ViewData["classId"]) %>         
            <p>
               <%=this.SubmitButton("Create")%>
            </p>
        </fieldset>

    <% } %>
   

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptPlaceHolder" runat="server">
</asp:Content>

